SavePicture
Saves an image
to an image document file.
Syntax: | imaG.SavePiture path , saveas , compression , colortransparent |
path (string) | The path of the image document file. |
saveas (constant) | The file type constant (caFileConstants ) |
compression (integer) | OPTIONAL : The factor by which to increase or decrease the compression of the image in a JPG file; use 1 for no compression, 100 for maximum. |
colortransparent (constant) | OPTIONAL : The value (caGifTransparentConstants ) that determines the transparent color in a GIF file. |
Returns: | TRUE if the action was concluded - FALSE if an error occur. |
When saving a Gif file from a true color image, an ERROR will be thrown.
FILE TYPE CONSTANTS
File Description | Constant | |
BMP | caFileBmp = 0 | |
GIF | caFileGif = 1 | |
JPG | caFileJpg = 2 | |
TIF | caFileTif = 3 (Win98 or higher with imgedit.ocx) | |
COMPRESSION AND TRANSPARENT
When saving a Jpg
file you can specify the compression level.
COMPRESSION LEVEL : 1 to 100
When saving a Gif
file you can specify one transparent color.
Available
Transparent Color Constants |
caGifTransparentNone = -1 |
caGifTransparentBlack = &H0& |
caGifTransparentWhite = &HFFFFFF |
caGifTransparentGray = &HC0C0C0 |
caGifTransparentRed = &HFF& |
caGifTransparentBlue = &HFF0000 |
caGifTransparentYellow = &HFFFF& |
If MODE PROPERTY is NOT caModeDraw then an ERROR will be thrown.
See Supported Files , LoadPicture